package com.tuanzi.loan.web.lazy.settlementsystem;

import com.tuanzi.loan.business.service.settlementsystem.SettlementProductService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementProductRequest;
import com.tuanzi.loan.vo.response.settlementsystem.SettlementProductResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class SettlementProductLazyDataModel extends LazyDataSessionModel<SettlementProductRequest,SettlementProductResponse> {
    private SettlementProductService settlementProductService;
    public SettlementProductLazyDataModel(SettlementProductRequest settlementProductRequest, CurrentUserBean session, SettlementProductService settlementProductService) {
        super(settlementProductRequest, session);
        this.settlementProductService = settlementProductService;
    }
    @Override
    protected Page<SettlementProductResponse> doLoad0(PageSearcher<SettlementProductRequest> pageSearcher) {
        return settlementProductService.list(pageSearcher);
    }
}
